{% extends "base.html" %}
{% from 'dashboard/cards.html' import trending_card with context %}

{% block content %}
  <div class="p-8" id="dashboard">
    <div class="flex justify-between items-center w-full">
      <div class="text-3xl font-bold mb-4">Dashboard</div>
      <a href="{{ url_for('base.edit_dashboard_view') }}" class="btn btn-primary">Edit Dashboard</a>
    </div>

    {% include "dashboard/user_item_cards.html" %}

    {% if dashboard_config.show_trending_clusters and clusters %}
      <div class="text-3xl font-bold mb-4">Trending Tags (last {{ dashboard_config.trending_cluster_days }} days)</div>

      <div class="grid grid-flow-row-dense grid-cols-3 gap-4 mt-4">
        {% for cluster in clusters %}
          {% call trending_card(cluster) %}
          {% endcall %}
        {% endfor %}
      </div>
    {% endif %}
  </div>
{% endblock content %}
